
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Explore the fundamentals of database systems, from installing MySQL and basic table manipulation to query optimization, joins, normalization, indices, constraints, and relational vs non-relational design.
Install and configure MySQL server on Windows, selecting MySQL eight LTS for compatibility with workbench. Set root credentials, PATH, and verify databases via the command prompt, including the word database.
Install and launch MySQL Workbench on Windows to provide an integrated development environment for SQL development and database administration, establish a local connection to localhost:3306, and verify the root credentials.
Install MySQL on Mac by downloading the MySQL Community Edition, running the dmg installer, setting a root password, starting the server, and verifying MySQL 8.4.5 in system settings.
Install and configure MySQL Workbench on Mac, connect to localhost, and test the connection; load the word.sql dataset to create city and country tables for upcoming SQL queries.
Learn the basics of sql, its role as a database language, and how a database management system like MySQL executes statements on persistent data.
Learn how the relational model powers SQL, storing data in tables with primary keys, atomic values, and nulls, enforced by integrity constraints and normalization to reduce redundancy.
Explore how external storage and data structures power database servers, compare in-memory and on-disk approaches, and learn why B trees and B+ trees optimize SQL and MySQL performance.
Explore the fundamental differences between procedural and non-procedural languages, highlighting how SQL lets you specify what to do while the database engine handles how to execute it.
Explore different database management systems, including Oracle, MySQL, and MS SQL, compare open-source benefits and cross-platform support, and assess suitability for small websites and read-heavy workloads.
Explore SQL data types, including char, varchar, text variants, numeric types from tinyint to bigint, and floating point and date/time types for practical database design.
Learn how to view databases with show databases, select the active database with the use command, and create a new database such as Udemy for working with tables.
Create a database table with the create statement, naming conventions, and column data types, illustrated by a student table with id, name, and gender, plus null and default constraints.
Learn to insert new students into a student database table using the insert command. Compare inserting by column order with explicit column lists, ensuring correct student id, name, and gender.
Insert multiple student records into the student table with a single query by specifying the student id, name, and gender columns and listing values separated by commas.
Use the delete command to remove rows from a table, applying a where clause to target single or multiple entries, and manage safe updates and limits.
Use the update statement to modify existing records by setting columns with a where clause, e.g., update the student name for id 3, avoiding updates to all rows.
Learn how to alter a database table to add, modify, and drop columns, using varchar and fixed-length char data types on the student table.
Use drop table and drop database to remove a table or a database, as shown with the student table and Udemy database, noting the irreversible data loss.
Explore primary keys, which uniquely identify each row and enforce not null constraints, and learn how single or composite keys and indexing boost MySQL lookups, joins, and updates.
Use auto incremented primary keys in MySQL to automatically generate unique student IDs, guaranteeing non-null, sequential values and fast, effortless inserts.
Learn how the not null constraint enforces that a column cannot be null, ensuring every row has a value.
Explains the enum datatype as a column that stores one value from a predefined list, using a gender field with f and m, and shows MySQL mapping to integers.
Learn how booleans map to tiny integers in MySQL, with zero representing false and any non-zero value representing true, including practical examples of is_completed and simple queries.
Learn how to define and use decimal values in MySQL with precision and scale, including decimal(19,4), coordinates, not null constraints, auto increment IDs, and handling truncation when limits are exceeded.
Explore how to handle date and date time in sql, create a table, insert using now, and compare date vs date time with practical examples of inserting and selecting data.
Apply the select statement to retrieve specific columns from city and country tables, compare explicit column lists with * usage, and learn basic join concepts to combine data across tables.
Learn how the where clause filters records in MySQL for retrieving, updating, and deleting data, with examples by country code, id, and population, and how the optimizer filters early.
Use the in keyword with the var keyword to filter the country table by code column against a list such as United States of America, France, and Germany.
Explore the between keyword in SQL to filter results by inclusive numeric ranges. Use where clauses like id between 1 and 10 and country_code between 'A' and 'D'.
Explore the not keyword to negate boolean expressions in SQL, reversing query results with where clauses, and using the in keyword to filter cities by country codes.
Explore logical operators in where clauses to filter records, learn and/or precedence, and how true, false or unknown values for nulls affect results, including equals, not equals, and in.
Learn how wildcards work with the like operator to search text patterns in SQL, using the percent and underscore symbols, with practical city and region examples and backslash escape handling.
Discover built-in sql functions for calculations, min, max, average, sum, and count, with examples and aliasing guiding data processing in select and group by.
Sorts query results with the order by clause, using ascending or descending order across one or more columns, with examples like country code, city name, and id.
Learn how limit and offset control returned rows and pagination, using city table examples with order by, primary keys, and an efficient where clause for large offsets.
Demonstrates using limit with order by to remove older logs from a Udemy logs table, illustrating date, date time, and timestamp types and retention via auto incremented ids.
Group by the country code to count cities with the count function and aliases, and learn how where precedes group by and how having handles post-aggregation filtering.
Learn to aggregate city populations by country code using sum, group by, and aliasing, then order results by total population in MySQL.
Explore the having clause to filter after aggregation using group by, with examples of summing city populations by country code and comparing totals against thresholds.
Count cities per country code using group by, and filter groups with having count(*) > 100, ordering results by city count in descending order.
Explore the case statement to implement conditional logic in SQL, using when, then, and else to classify population into large, middle, and small city categories.
Explore handling null values in mysql with is null and ifnull, using an items table to demonstrate defaulting null prices and accurate sums.
explore foreign keys and how they connect multiple tables by linking child and parent tables through primary keys, enabling references and relationships in relational databases.
Explain how a foreign key references a primary key to link university and student tables, using unsigned integers with auto increment and not null constraints.
Learn how to name foreign key constraints, why the constraint name matters for dropping, and how to add or alter constraints using information schema and alter table.
Explore how to handle changes when dealing with multiple tables by using foreign keys and options like restrict, set null, and cascade to manage updates and deletions.
Explore how foreign key constraints enforce referential integrity between university and student database tables. See how on update cascade and on delete cascade propagate updates and deletions to dependent rows.
Learn how data normalization reduces redundancy, improves data integrity, and simplifies queries in relational databases, using primary keys, foreign keys, and first to third normal forms.
Apply the first normal form by enforcing atomic values and a value per row, splitting data, and using foreign keys to reference tables, ensuring consistent types and unique column names.
Master the second normal form by identifying functional dependencies, avoiding partial dependencies, and splitting composite key tables into separate student and university tables for proper normalization.
Master the third normal form by applying second normal form principles, removing transitive dependencies, and separating tables for students, teachers, and subjects.
Configure the person and university tables with an unsigned auto-increment id, a non-null name, and a university foreign key using cascade, then populate with MIT, Harvard, Cambridge and attendee data.
Learn how inner join retrieves data from multiple tables by matching keys, using a person and university example to show the intersection of related records.
master inner join to combine data from the person and university tables, selecting person name and university name with aliases, using the foreign key relation of person.university to university.id.
Explore left join, which keeps all records from the left table and matches data from the right, shown with students and universities and nulls when no match.
Explore left join in SQL, using a person and university table to show how left outer join returns all persons with matching universities and includes nulls for missing relations.
Explore the right join concept in SQL, returning all records from the right table and matching rows from the left, illustrated with universities and students.
Learn how right join works alongside left join and inner join by analyzing person and university tables, showing that right join returns all universities and handles nulls.
Learn to join city and country tables using inner join to get city population, country name, and continent, and understand left join behavior and ordering.
Join the city and country tables on country code, sum populations by continent, and order by total population to identify Asia as the largest continent.
Learn how to use union and union all in MySQL to combine results from multiple select statements, enforce matching column order and data types, and understand duplicate handling versus joins.
Practice joining tables online using the w3school sql tryit editor without installing mysql. Explore datasets such as customers, categories, orders, and products.
Join the customers and orders tables with an inner join using aliases c and o; select customer names and order dates, then group by customer name.
Learn how to join the customers and orders tables, count each customer's orders with an alias NumOfOrders, and display the customer name while sorting by order count.
Join the customers and orders tables to count orders by country, group results by country, and sort the counts in descending order to identify which countries have the most orders.
Master subqueries in SQL, including inner and outer queries, non-correlated and correlated types, scalar subqueries, IN and NOT IN, and transforming correlated subqueries into joins for better performance.
Explore non-correlated subqueries and scalar subqueries using a city table. Learn how the inner query computes the max id (4079) and the outer query uses that value to filter results.
Learn how non-correlated subqueries handle multiple values by using not in to exclude Afghanistan cities based on a subquery that returns multiple ids, such as 123 and 4.
Explore how a correlated subquery links inner and outer queries via country code to count cities, and why joins often deliver faster performance.
Compare non correlated and correlated subqueries in MySQL, where non correlated run independently and the inner query precedes the outer; conclude that joins are often more efficient.
Transform a correlated subquery into a join by combining the country and city tables, counting cities per country, and ordering results to reveal top countries with 22 cities.
Understand transactions as a logical unit of work that guarantees related inserts, updates, and deletes execute entirely or not at all, with commit, rollback, savepoint, and start transaction.
Explore the acid principles—atomicity, consistency, isolation, and durability—that ensure transactions are reliable, prevent partial updates, enforce valid states, and preserve changes after a crash.
Explore how transactions stay reliable with undo logs and the redo log, ensuring atomicity and durability, while locking and versioning enforce consistency and isolation.
Turn off autocommit, start a transaction, and execute related queries as a single atomic unit, then commit to persist changes, including updating the university foreign key to Harvard.
Start a transaction with autocommit off, then use rollback to cancel uncommitted changes; understand how commit saves changes and that rollback has no effect after commit.
Utilize savepoints to roll back to a specific point in a transaction, enabling fine-grained control, partial failure handling, and selective commit decisions.
Learning SQL is not just about typing commands. It’s about unlocking the logic that drives all modern software. When you truly understand databases, you don't just write queries, you think more logically, solve performance issues faster, and gain an invaluable skill that is essential across every tech domain.
This course doesn't just teach you syntax. It gives you the deep clarity and advanced understanding that separates junior developers from senior professionals.
Phase 1: Your Foundation in Database Architecture
We start by building a rock-solid foundation that most courses ignore:
Zero-To-Tool: Install MySQL and set up your professional coding environment.
The "Why": Learn what a database truly is, how the DBMS organizes information, and how the relational model dictates system behavior.
Internal Power: See exactly how internal data structures (like B+ Trees) influence the speed and predictability of real-world queries.
Phase 2: Build, Manipulate, and Design Right Away
You’ll move immediately from theory into concrete, practical experience:
Active Building: You won't just watch. You will create databases, design tables, and choose optimal data types for real-life situations.
Data Control: Master all core operations: inserting, updating, removing, and restructuring data as your projects evolve.
Integrity First: Learn keys, constraints, and normalization to ensure your data designs are clean, reliable, and production-ready from day one.
Phase 3: Write Professional-Level Queries
Once the basics are solid, we move beyond simple commands to true data expertise:
The Core Logic: Master all core SQL operations: filtering, sorting, grouping, counting, and complex multi-table joins.
Beyond Basics: Shine in interviews by mastering advanced concepts like subqueries, transactions, and data views that solve complex real-world tasks.
The Speed Secret: Deep-dive into Indices to understand why some queries are fast and others are slow, giving you the power to fix performance bottlenecks.
Phase 4: Reach Professional System Mastery
This is the final stage that turns you into a database expert. You will master the concepts used in production environments:
Performance Tuning: Deploy stored procedures (with loops, variables, and cursors) to automate complex tasks and use advanced optimization methods.
MySQL Internals: See inside the engine! Learn about paging, B-Trees, and how MySQL stores and retrieves data, allowing you to troubleshoot like an expert.
System Scaling: Go beyond a single server. Master system growth concepts critical for big data: Replication, Sharding, and the CAP Theorem.
Practical Mastery Built On Real Coding Challenges
The course includes hands-on coding tasks, guided exercises, and practical challenges that mirror real industry scenarios. You gain skill by doing the work yourself. This is what turns knowledge into lasting, professional ability.
If you are ready for a structured, complete, and practical path to mastering SQL and MySQL, join the course and start your journey today.